<!--
 * @Author       : WuWei
 * @LastEditors  : WuWei
 * @Date         : 2021-05-25 16:29:57
 * @LastEditTime : 2021-05-27 20:31:41
 * @FilePath     : /vue-boost/src/components/table/table.vue
 * @Description  : 表格组件
-->
<template>
  <a-table :dataSource="tableList" :columns="tableColumns" :bordered="isBordered" :pagination="{ pageSize: pageSize, current: pageNum,}" @change="onGetList"></a-table>
</template>

<script lang=ts>
import { defineComponent } from "vue";
export default defineComponent ({
    props: {
        tableList: {
            type: Array,
            default: [],
        },
        // 表头
        tableColumns: {
            type: Array,
            default: [],
            required: true,
        },
        // 是否添加边框
        isBordered: {
            type: Boolean,
            default: false,
        },
        // 一页展示数据
        pageSize: {
            type: Number,
            default: 20,
        },
        // 当前页
        pageNum: {
            type: Number,
            default: 1,
        }
    },
setup(props, context) {
    var params = {
        pageNum: 1,
        pageSize: 20,
    }
    const onGetList = () => {

    }
    return {
        onGetList,
        pageNum: props.pageNum,
        tableList: props.tableList,
        tableColumns: props.tableColumns,
        isBordered: props.isBordered,
    }
}
})
</script>

<style>

</style>